package com.changgou.order.listener;

import com.changgou.order.service.OrderService;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class OrderAuthTakeListener {

    @Autowired
    private OrderService orderService;
    /**
     * 自动确认收货的消息队列监听器
     * @param message - 无意义
     */
    @RabbitListener(queues = "order_auto_take")
    public void receiveMessage(String message){
        //自动确认收货
        orderService.orderAutoTake();
    }
}
